Skip to content

fix(plugins): keep checkPlugin from undoing the ESLint 9 migration - #8585

Merged
JohnMcLear merged 2 commits into
developfrom
fix/checkplugin-eslint9
Nov 29, 2026
Merged

JohnMcLear merged 2 commits into
developfrom
fix/checkplugin-eslint9

Conversation

@JohnMcLear

Copy link
Copy Markdown
Member

The template sync on 29 Nov pushed autofixes to ep_hljs and ep_dynamic_default_content that undid the ESLint 9 migration: it re-added .eslintrc.cjs, removed the typescript >=7 Dependabot ignore, and wrote a lint.yml with pnpm version: 10, which fails against a plugin's packageManager pin. The other 79 campaign plugins would get the same on the next successful run. The workflow is disabled until this lands.

  • lib/eslintrc.cjs is replaced by lib/eslint.config.mjs. A plugin that has a flat config keeps it, and any leftover .eslintrc.* is removed (ESLint 9 ignores it). A plugin with only the stock .eslintrc.cjs, or no config, gets the flat config and at least eslint ^9.39.5 / eslint-config-etherpad ^5.0.4. A customised .eslintrc.* only gets a warning.
  • lib/dependabot.yml keeps the typescript >=7 ignore.
  • pnpm follows core everywhere. lint.yml sparse-checks out core's package.json and passes it as package_json_file, like the backend and frontend workflows. No template sets a pnpm version:, so nothing clashes with packageManager. checkPlugin removes a plugin's own packageManager: pnpm@... pin.
  • ep_dynamic_default_content no longer needs its own lint.yml.
  • The helpers live in bin/plugins/pluginLint.ts and are covered in src/tests/backend/specs/checkPlugin.ts, along with template checks.

Plugin PRs that repair the two affected repos: ether/ep_hljs#31, ether/ep_dynamic_default_content#137.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TcYAoDMav4BPPE9JrMtSvw

The 28 Nov sync put .eslintrc.cjs back into ep_hljs and
ep_dynamic_default_content, dropped their TypeScript 7 Dependabot ignore,
and wrote a lint.yml whose `version: 10` clashes with a plugin
packageManager pin ("Multiple versions of pnpm specified").

- Replace lib/eslintrc.cjs with lib/eslint.config.mjs. A plugin with a
  flat config keeps it and loses any leftover .eslintrc.*; one with only
  the stock .eslintrc.cjs, or none, gets the flat config and ESLint 9.
  A customised .eslintrc.* is only warned about.
- Default devDependencies are eslint ^9.39.5 and
  eslint-config-etherpad ^5.0.4.
- lib/dependabot.yml keeps typescript below 7.
- lint.yml takes pnpm from core's packageManager (sparse checkout of
  core's package.json), like the test workflows, so no template pins a
  pnpm version. checkPlugin drops a plugin's own pnpm packageManager pin.
- ep_dynamic_default_content no longer needs its own lint.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcYAoDMav4BPPE9JrMtSvw
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

Prevent plugin sync from reversing the ESLint 9 migration

🐞 Bug fix 🧪 Tests 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Preserve plugin flat configs and migrate stock legacy configs without overwriting customizations.
• Keep the TypeScript 7 Dependabot ignore and use core’s pnpm version in plugin CI.
• Add regression tests for config migration, workflow templates, and pnpm pins.
Merge Risk 🟡 Medium

Blast radius 🟡 Medium 💥 4 capabilities

  • 4 affected capabilities within one bounded functional scope: Etherpad plugin fleet maintenance and CI integration.
  • The changed synchronizer produces persistent configuration, dependency, and package-manager changes in plugin repositories, which are then consumed by their plugin CI; these are one bounded maintenance integration rather than separate technical layers.
  • The workflow checks out core metadata only to select pnpm, then installs and lints the plugin checkout; this is the linting operation within the same plugin CI integration as synchronization and release.
  • The changed template controls the pnpm setup used by the plugin's package installation and publication job; it is a separate release outcome within the same bounded plugin CI integration.
  • The changed Dependabot policy governs automated dependency proposals for the same plugin repositories maintained by checkPlugin; its outcome is dependency-update selection, not a separate runtime domain.
Sources

bin/plugins/lib/dependabot.yml[12-15]

    ignore:
      # typescript-eslint has no release that supports TypeScript 7 yet.
      - dependency-name: "typescript"
        versions: [">=7"]

bin/plugins/lib/npmpublish.yml[41-44]

          # No `version:`: the core checkout above puts core's package.json at
          # the workspace root, so pnpm comes from core's packageManager, like
          # every other plugin workflow.
          run_install: false
Behavioral complexity 🟡 Medium 🧩 Interacting branches, Compatibility cases

  • Before, checkPlugin handled a legacy .eslintrc.js/.cjs path and fixed dependency entries independently.
  • After, it classifies multiple flat and legacy config states, preserves customized legacy files, conditionally migrates stock files, changes dependency floors, removes pnpm pins, and varies lockfile installation by autofix mode.
  • The new correctness conditions are that configuration classification, package dependency updates, persistent writes, and the selected ESLint version remain consistent across flat-config, stock-legacy, customized-legacy, and no-config plugin states.
  • The branch structure is new interaction rather than merely reuse of an existing mapper or validator.
Potential damage 🟡 Medium 🩹 Recoverable

  • If the synchronization behavior regresses, affected plugin repositories can retain unusable lint configuration, dependency metadata, or lockfiles.
  • Reverting Etherpad stops future propagation but does not automatically restore already-pushed plugin files; repair or another synchronization run is needed.
  • Code rollback prevents new synchronization, while already-written plugin state requires a corrective commit or successful rerun.
  • No external customer data or runtime application state is changed by this path.
Assessed commit 0a7a22f
Diagram

graph TD
  Checker["checkPlugin"] --> Helper["Lint helper"] --> Plugin["Plugin repo"]
  Flat["Flat template"] --> Helper
  Checker --> Workflows["CI templates"] --> Plugin
  Core["Core package.json"] --> Workflows
  Checker --> Dependabot["Dependabot template"] --> Plugin
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Bridge customized legacy configs with FlatCompat
  • ➕ Could reduce the number of plugins requiring manual ESLint migration.
  • ➖ Adds compatibility dependencies and risks silently changing customized lint behavior across the plugin fleet.

Recommendation: Keep the PR’s selective migration: replace only the known stock config, preserve existing flat configs, and warn on customized legacy configs. This avoids silently breaking plugin-specific lint rules during the automated sync.

Files changed (8) +272 / -20

Bug fix (3) +152 / -20
checkPlugin.tsIntegrate safe ESLint migration and pnpm pin removal +26/-17

Integrate safe ESLint migration and pnpm pin removal

• Uses the new lint helpers instead of writing a legacy ESLint config, and sets minimum dependencies when applying the flat template. Removes the lint workflow exception for ep_dynamic_default_content and drops plugin pnpm packageManager pins.

bin/plugins/checkPlugin.ts

lint.ymlSource lint CI’s pnpm version from core +18/-3

Source lint CI’s pnpm version from core

• Sparse-checks out core’s package.json and passes it to pnpm/action-setup instead of specifying pnpm version 10. Runs installation and linting in the plugin checkout and scopes the cache key to its lockfile.

bin/plugins/lib/lint.yml

pluginLint.tsAdd isolated ESLint config and pnpm pin helpers +108/-0

Add isolated ESLint config and pnpm pin helpers

• Detects flat and legacy configs, removes obsolete legacy files, migrates only the stock config, and warns about customized configs. Also removes plugin pnpm packageManager pins during autofix while warning about devEngines pins.

bin/plugins/pluginLint.ts

Tests (1) +100 / -0
checkPlugin.tsCover plugin migration and template regressions +100/-0

Cover plugin migration and template regressions

• Adds scratch-directory tests for ESLint config preservation, migration, customization, and non-autofix behavior. Checks the Dependabot ignore, pnpm workflow setup, and plugin pin removal.

src/tests/backend/specs/checkPlugin.ts

Documentation (2) +13 / -0
README.mdDocument plugin lint and pnpm sync behavior +10/-0

Document plugin lint and pnpm sync behavior

• Explains when checkPlugin preserves, replaces, or warns about ESLint configs. Documents core-sourced pnpm and removal of plugin pnpm pins.

bin/plugins/README.md

npmpublish.ymlClarify pnpm version selection during publishing +3/-0

Clarify pnpm version selection during publishing

• Documents that the existing core checkout supplies the pnpm version through its packageManager field; the workflow does not set an explicit version.

bin/plugins/lib/npmpublish.yml

Other (2) +7 / -0
dependabot.ymlPreserve the TypeScript 7 Dependabot ignore +4/-0

Preserve the TypeScript 7 Dependabot ignore

• Adds an ignore rule for TypeScript versions 7 and above so template sync does not remove the plugin fleet’s compatibility constraint.

bin/plugins/lib/dependabot.yml

eslint.config.mjsProvide the default ESLint 9 flat config +3/-0

Provide the default ESLint 9 flat config

• Exports eslint-config-etherpad’s flat plugin configuration as the default for plugins eligible for automatic migration.

bin/plugins/lib/eslint.config.mjs

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Custom-config plugins lose linting ✓ Resolved
Description
checkPlugin adds ESLint 9 as a default dependency before syncEslintConfig determines whether a
customised legacy config can be migrated. When a plugin has a customised .eslintrc.cjs, no flat
config and no existing ESLint dependency, autofix installs ESLint 9 but leaves only the legacy
config, which the generated lint workflow cannot use.

2. Plugin installs reject the stale lockfile ✓ Resolved
Description
checkPlugin migrates ep_provenance's stock ESLint config and raises its dependency requirements,
but does not regenerate its existing pnpm-lock.yaml. That leaves the plugin's lockfile recording
ESLint 8 and the old dependency specifiers, so its CI install fails before linting and its release
workflow cannot proceed.


Remediation recommended

3. Some migrated plugins cannot lint ✓ Resolved
Description
syncEslintConfig removes a stock legacy config when a flat config exists, but returns
wroteFlatConfig: false, so checkPlugin does not raise an existing ESLint 8 dependency to version
9. For a plugin with both configs and ESLint 8, the removed legacy file was the configuration its
eslint . command used; the subsequent dependency update preserves the ESLint 8 range.

4. Custom lint rules are deleted ✓ Resolved
Description
syncEslintConfig deletes every .eslintrc.* file as soon as it finds a flat config, without
applying its customised-config check. When a plugin has both kinds of config, autofix removes its
customised legacy rules rather than warning that they may still need manual migration.

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

…t config

Review follow-ups:
- Decide the ESLint config before touching eslint devDependencies. A
  plugin with only a customised .eslintrc.* is no longer given ESLint 9,
  which would ignore its config.
- A plugin that already has a flat config gets at least eslint ^9.39.5
  and eslint-config-etherpad ^5.0.4, so removing its legacy config cannot
  leave it on ESLint 8.
- Next to a flat config, only the stock .eslintrc.cjs is deleted; a
  customised one is kept with a warning.
- autofix runs `pnpm install --no-frozen-lockfile`, so the lockfile follows
  the package.json changes even where CI makes frozen the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcYAoDMav4BPPE9JrMtSvw
@JohnMcLear
JohnMcLear merged commit 1b300ff into develop Nov 29, 2026
41 checks passed
@JohnMcLear
JohnMcLear deleted the fix/checkplugin-eslint9 branch November 29, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant